import { serverURL, token } from "../services/httpService";

/*获取用户信息*/
export function getUser (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getUser`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
			// console.log('用户信息',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取认证状态*/
export function getNowCheck (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getNowCheck`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
			// console.log('认证状态',event.data);
		}
	})
}

/*是否可以上传图片*/
export function uploadimg (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/is_uploadimg`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: {
			corrid: requestData,
		},
		success: (event) => {
			// console.log('成功',event.data);
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*是否可以上传文件*/
export function uploadfile (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/is_uploadfile`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: {
			corrid: requestData,
		},
		success: (event) => {
			// console.log('成功',event.data);
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*上传图片*/
export function upload_image (requestData, onsuccess) {
	uni.uploadFile({
		url:`${serverURL}/api/upload_image`,
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		name: 'file',
		filePath: requestData,
		success: (event) => {
			// console.log('成功',event.data);
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/* 获取首页信息*/
export function index (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getUser`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
			// console.log('首页信息',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/* 获取热门搜索信息*/
export function search (onsuccess) {
	uni.request({
		url:`${serverURL}/api/search`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
			console.log('热门搜索',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/* 热门搜索提交*/
export function searchkeyword (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/search`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
			// console.log('法律知识列表',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*点赞*/
export function userLike (id,onsuccess) {
	uni.request({
		url:`${serverURL}/api/userLike`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: {
			id: id,
		},
		success: (event) => {
			onsuccess(event.data)
			// console.log('点赞',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*法律知识列表*/
export function getknowList (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/getknowList`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
			// console.log('法律知识列表',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}
/*法律知识详情*/
export function knowDetail (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/knowDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
			// console.log('法律知识详情',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*专业问答列表*/
export function getquestionsList (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/getquestionsList`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
			// console.log('专业问答列表',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}
/*专业问答列表详情*/
export function questionsDeatil (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/questionsDeatil`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
			// console.log('专业问答详情',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*擅长类型*/
export function getType (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getType`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
			// console.log('擅长类型',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*法堂*/
export function getHall (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getHall`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
			// console.log('法堂',event.data);
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师详情*/
export function lawyerDetail (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/lawyerDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*关注律师*/
export function followlawyer (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/followlawyer`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取关注列表*/
export function myfollow (onsuccess) {
	uni.request({
		url:`${serverURL}/api/myfollow`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*查看更多列表*/
export function moreAnswer (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/moreAnswer`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取服务协议*/
export function getservice (requestData, onsuccess) {
	uni.request({
		url:`${serverURL}/api/getservice`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取优惠券(包含过期)*/
export function coupons (onsuccess) {
	uni.request({
		url:`${serverURL}/api/coupons`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取优惠券(包含不过期)*/
export function couponss (onsuccess) {
	uni.request({
		url:`${serverURL}/api/couponss`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*领取优惠券*/
export function receive (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/coupon/receive`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取诉讼类别*/
export function gationTitle (onsuccess) {
	uni.request({
		url:`${serverURL}/api/gationTitle`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*诉讼计算*/
export function gation (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/gation`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*诉讼计算*/
export function lawyerPrice (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/lawyerPrice`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*最新评价*/
export function commentList (onsuccess) {
	uni.request({
		url:`${serverURL}/api/commentList`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*最新订单*/
export function newOrder (onsuccess) {
	uni.request({
		url:`${serverURL}/api/newOrder`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*热门文章列表*/
export function hotArticle (onsuccess) {
	uni.request({
		url:`${serverURL}/api/hotArticle`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*文章详情*/
export function articleDetail (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/articleDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取会员价格*/
export function getVipPrice (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getVipPrice`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*会员下单*/
export function vipPay (onsuccess) {
	uni.request({
		url:`${serverURL}/api/vipPay`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取免费咨询配置*/
export function getfreeConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getfreeConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*提交免费咨询*/
export function payorder (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/payorder`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*律师获取咨询列表*/
export function rushList (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/rushList`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*咨询跳过*/
export function skip (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/skip`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*咨询抢单*/
export function taking_orders (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/taking_orders`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师详情*/
export function getlawyerDetail (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getlawyerDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*修改律师信息*/
export function editlawyerDetail (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/editlawyerDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取服务定价*/
export function getservices (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/getservices`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*提交服务定价*/
export function setservices (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/setservices`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*私问配置*/
export function getPrivateConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getPrivateConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*计时电话*/
export function getsmsConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getsmsConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*约见律师*/
export function getpointConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getpointConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*合同审查*/
export function getcontractConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getcontractConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*文书代写*/
export function getdocumentConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getdocumentConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*律师函*/
export function getlawyerConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getlawyerConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*户籍调查*/
export function getsurveyConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getsurveyConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*民事起诉状*/
export function getcivilConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getcivilConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*离婚咨询*/
export function getcounseConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getcounseConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*劳动仲裁委托*/
export function getentrustConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getentrustConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*委托律师*/
export function getentrustLConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getentrustLConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*工伤赔偿*/
export function getIndustrialConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getIndustrialConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*合伙协议*/
export function getagreementConfig (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getagreementConfig`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*付费咨询下单*/
export function payPriceorder (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/payPriceorder`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*律师列表*/
export function lawyerList (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/lawyerList`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师资金明细*/
export function lawyerPriceDetail (onsuccess) {
	uni.request({
		url:`${serverURL}/api/lawyerPriceDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师收人分析*/
export function analysis (onsuccess) {
	uni.request({
		url:`${serverURL}/api/analysis`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师最近7日收入分析*/
export function weekPrice (onsuccess) {
	uni.request({
		url:`${serverURL}/api/weekPrice`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师最近一年收人分析*/
export function yearPrice (onsuccess) {
	uni.request({
		url:`${serverURL}/api/yearPrice`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取律师产品收入情况*/
export function typePrice (onsuccess) {
	uni.request({
		url:`${serverURL}/api/typePrice`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*发起提现*/
export function cash (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/cash`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取提现记录*/
export function cashList (onsuccess) {
	uni.request({
		url:`${serverURL}/api/cashList`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取我的评价*/
export function mycomment (onsuccess) {
	uni.request({
		url:`${serverURL}/api/mycomment`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*获取我的感谢*/
export function myRed (onsuccess) {
	uni.request({
		url:`${serverURL}/api/myRed`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*协作类别*/
export function getcoopType (onsuccess) {
	uni.request({
		url:`${serverURL}/api/getcoopType`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*提交协作*/
export function putcoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/putcoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*协作列表*/
export function getcoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/getcoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*取消协作*/
export function diecoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/diecoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*查看单个协作详情*/
export function coopDetail (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/coopDetail`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*协作接单*/
export function sendcoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/sendcoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*我的发单*/
export function mycoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/mycoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*我的接单*/
export function taking_coop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/taking_coop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*我的接单*/
export function paycoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/paycoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*完成协作*/
export function completecoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/completecoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*协作确认完成*/
export function confirmcoop (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/confirmcoop`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}

/*协作确认完成*/
export function completecoopUser (requestData,onsuccess) {
	uni.request({
		url:`${serverURL}/api/completecoopUser`,
		method: "POST",
		header: {
			Authorizationpas: `Bearer ${token}`,
		},
		data: requestData,
		success: (event) => {
			onsuccess(event.data)
		},
		fail(e) {
			console.log('失败', e);
		}
	})
}